<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" aria-labelledby="createOrEditModal" class="modal fade"
    tabindex="-1" role="dialog" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #commentsForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="operationType=='add'">{{l("CreateNewcomment")}}</span>
                        <span *ngIf="operationType=='edit'">{{l("Editcomment")}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" aria-label="Close">
                        <i aria-hidden="true" class="ki ki-close"></i>
                      </button>
                </div>
                <div class="modal-body">
                    <tabset class="tab-container tabbable-line">
                        <tab heading="{{l('storeMessage')}}" customClass="kt-tabs__item">
                            <div class="row">
                                <div class="col-12">
                                    <div class="form-group">
                                        <label>{{l("UserName")}} *</label>
                                        <input #nameInput="ngModel" class="form-control" type="text" name="userName"
                                            [(ngModel)]="comment.userName" required maxlength="32">
                                        <validation-messages [formCtrl]="nameInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-6">
                                    <div class="form-group">
                                        <label>{{l("orderNumber")}}</label>
                                        <input #orderNumberInput="ngModel" class="form-control" pattern="^(([1-9][0-9]*)|0)\b$"
                                            maxlength="20" type="number" name="orderNumber" [(ngModel)]="comment.orderNumber">
                                        <validation-messages [formCtrl]="orderNumberInput"></validation-messages>
                                    </div>
                                </div>
                                <div class="col-6">
                                    <div class="form-group">
                                        <label>{{l("Time")}}*</label>
                                        <date-range-picker [dateRangePickerOptions]='{ "opens": "left","singleDatePicker":true,"timePicker": true,"timePickerSeconds": true}'
                                            name="time" [(startDate)]="comment.commentDateTime" [(endDate)]="comment.commentDateTime"
                                            [allowFutureDate]="true" needInitDate="true" [admitDelete]="false">
                                        </date-range-picker>
                                    </div>
                                </div>
                                <div class="col-12">
                                    <div class="form-group">
                                        <label>{{l("CommentContent")}}*</label>
                                        <textarea #quantityInput="ngModel" class="form-control" name="content"
                                            [(ngModel)]="comment.content"></textarea>
                                        <validation-messages [formCtrl]="quantityInput"></validation-messages>
                                    </div>
                                </div>
                            </div>
                        </tab>
                    </tabset>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-primary" (click)="close()">{{l("Cancel")}}</button>
                    <button type="submit" *ngIf="editable" class="btn btn-primary blue" [disabled]="!commentsForm.form.valid"
                        [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')">
                        <i class="fa fa-save"></i>
                        <span>{{l("Save")}}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>